/**
 * 文章
 * @constructor
 */
class Article {
    /**
     * 构造函数
     * @param title
     * @param content
     * @param description
     * @param createTime
     * @param userId
     */
    constructor(title,content,description,createTime = new Date(),userId) {
        this.title = title
        this.content = content
        this.description = description
        this.createTime = createTime
        this.userId = userId
    }
}

Article.prototype = {
    id:Number,//主键
    title:String,//'文章标题',
    content:String, //'文章正文',
    description:String,//'描述',
    isPublished:Boolean,//'公开或私密',
    isRecommend:Boolean,// '推荐开关',
    isAppreciation:Boolean,//'赞赏开关',
    isComment_enabled:Boolean,// '评论开关',
    createTime:Date,//'创建时间',
    updateTime:Date,//'更新时间',
    views:Number,//'浏览次数',
    words:Number,//'文章字数',
    readTime:Number,//'阅读时长(分钟)',
    categoryId:Number,//'文章分类category_id',
    userId:Number,//'文章作者',
    isTop:Boolean,//'是否置顶',
    password:String,//'密码保护',
    constructor(){},
    toString(){
        return this.toString()
    },
    toValue() {
        return this
    },
}
